-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP - [Mouse Without Borders] - refactoring "Common" classes (Part 4) - #35155 #37579
base: main
Are you sure you want to change the base?
WIP - [Mouse Without Borders] - refactoring "Common" classes (Part 4) - #35155 #37579
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
internal static void StartMouseWithoutBordersService(string desktopToRunMouseWithoutBordersOn = null, string startTag1 = "byapp", string startTag2 = null) | ||
{ | ||
// NOTE(@yuyoyuppe): the new flow assumes we run both mwb processes directly from the svc. | ||
if (Common.RunWithNoAdminRight || true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The use of '|| true' in the conditional always evaluates to true, bypassing the intended service start logic. Consider removing '|| true' or revising the condition to properly control service startup.
if (Common.RunWithNoAdminRight || true) | |
if (Common.RunWithNoAdminRight) |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
Hi @mikeclayton , |
@jaimecbernardo - I didn't request the review as I've not properly worked through the tests yet, but it compiles locally and superficially appears to work. Happy to follow your lead though - I don't mind if you want to wait until I've finished testing before starting the review process. I already pushed one set of changes (#36950) into the next release (v0.89.0), so might be better to defer this PR until the release after to avoid too much churn? |
Summary of the Pull Request
Part 4 of a slow-running refactor of the giant "Common" class in Mouse Without Borders into individual classes with tighter private scope.
Common.Event.cs
->Event.cs
Common.Helper.cs
->Helper.cs
Common.Launch.cs
->Launch.cs
Common.Service.cs
->Service.cs
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed
Run manual tests from Test Checklist Template:
Install PowerToys on two PCs in the same local network:
Setup Connection:
Verify Connection Status:
Test Remote Mouse/Keyboard Control:
Test Remote Control with Elevated Apps:
get-process -Name "PowerToys.MouseWithoutBorders*" -IncludeUserName | format-table Id, ProcessName, UserName
PowerToys.MouseWithoutBorders.exe
- running asSYSTEM
PowerToys.MouseWithoutBorders.Helper.exe
- running as current userget-service -Name "PowerToys.*" | ft Status, Name, UserName; get-ciminstance -Class "Win32_Service" -Filter "Name like 'PowerToys%'" | ft ProcessId, Name
PowerToys.MWB.Service
- running asLocal System
Test Module Enable Status:
Test Disconnection/Reconnection:
Test Various Local Network Conditions:
Clipboard Sharing:
Drag and Drop:
Lock and Unlock with "Use Service" Enabled:
Test Settings:
Group Policy Tests
See https://learn.microsoft.com/en-us/windows/powertoys/grouppolicy
[missing]
- "Activation -> Enable Mouse Without Borders" enabled, with GPO warning hidden0
- "Activation -> Enable Mouse Without Borders" set to "off" and disabled, with GPO warning visible1
- "Activation -> Enable Mouse Without Borders" set to "on" and disabled, with GPO warning visible[missing]
- "Advanced Settings -> IP address mapping" enabled, with GPO warning hidden0
- "Advanced Settings -> IP address mapping" enabled, with GPO warning hidden1
- "Advanced Settings -> IP address mapping" disabled, with GPO warning visible[missing]
- "Advanced Settings -> IP address mapping" enabled, with GPO warning and GPO values hidden[empty value]
- "Advanced Settings -> IP address mapping" enabled, with GPO warning hidden and GPO values hidden[non-empty value]
- "Advanced Settings -> IP address mapping" enabled, with GPO warning visible and GPO values visible